--Execute as OE
REM plan_query1.sql

REM Generate the execution plan.
REM (The query name Q1 is optional)
explain plan for
 select /*+ result_cache q_name(Q1) */ * from orders;

set echo off
REM Display the execution plan. Verify that the query result 
REM is placed in the Result Cache.
REM using the code in ORACLE_HOME/rdbms/admin/utlxpls

select plan_table_output from table(dbms_xplan.display('plan_table',null,'serial'));

